
<div class="tableform" id='sync_form'>
    <h3>同步菜鸟模板</h3>
    <div style="margin: 15px 0px 15px;">
        <a href="http://cloudprint.cainiao.com/cloudprint/client/CNPrintSetup.exe" target="_blank">下载菜鸟组件</a> &nbsp;&nbsp;
        <a href="https://cloudprint.cainiao.com" target="_blank">设置菜鸟模板</a>
    </div>
    <div id="progress">同步中...</div>
</div>
<script type="text/javascript">
    (function(){
        var finder_id = '<{$finder_id}>';
        new Request({
            url: 'index.php?app=logisticsmanager&ctl=admin_express_cainiao&act=doSyncTpl',
            method: 'post',
            onSuccess: function (response) {
                var rs = JSON.decode(response);
                if (rs['rsp'] == 'succ') {
                    var pHtml = '<br/>同步完成';
                    $('progress').set('html', pHtml);
                    finderGroup[finder_id].refresh.delay(100, finderGroup[finder_id]);
                    //$('sync_form').getParent('.dialog').retrieve('instance').close();
                } else {
                    var pHtml = '<br/><span style="color:red">失败：' + rs['msg'] + '</span>';
                    $('progress').set('html', pHtml);
                }
            }
        }).send();
    })();
</script>